import request from '@/utils/request'
const serviceName = 'System'

export function getVerifyCode() {
  return request({
    url: serviceName + '/Auth/Code' + '?t=' + new Date().getTime(),
    method: 'post'
  })
}
export function login(data) {
  return request({
    url: serviceName + '/Auth/Login',
    method: 'post',
    data
  })
}
export function logout() {
  return request({
    url: serviceName + '/Auth/LogOut',
    method: 'get'
  })
}
export function getUserMenus() {
  return request({
    url: serviceName + '/System/GetUserMenus',
    method: 'get'
  })
}
export function getUserInfo() {
  return request({
    url: serviceName + '/User/GetUserInfo',
    method: 'get'
  })
}

export default {
  getVerifyCode,
  login,
  logout,
  getUserMenus,
  getUserInfo
}
